libxl: Fix carefd lock leak in save callout
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 24 Feb 2014 14:19:15 +0000 (14:19 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 13 Mar 2014 12:50:18 +0000 (12:50 +0000)
commit7eb73add5de5839f160b902dd894d3aecc10ba0c
tree1dbbfd979dc7ee4388f7eb19ab0038f6a11887fe
parent2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae
libxl: Fix carefd lock leak in save callout

If libxl_pipe fails we leave the carefd locked, which translates to
the atfork lock remaining held.  This would probably cause the process
to deadlock shortly afterwards.

Of course libxl_pipe is very unlikely to fail unless things are
already going very badly.  This bug has not been observed anywhere as
far as we are aware.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: George Dunlap <george.dunlap@eu.citrix.com>
tools/libxl/libxl_save_callout.c